#include "stdafx.h"
#include "snetwork/Cookie.h"

namespace Sock
{
    Cookie *Cookie::m_instance = NULL;

    Cookie *Cookie::instance()
    {
        if (m_instance==NULL) {
            m_instance = new Cookie();
        }
        return m_instance;
    }
        
    Cookie::Cookie()
    {
        
    }    
        
    bool Cookie::SetCookie(std::string name)
    {
        this->SetCookie(name, "", 0);
        return true;
    } 
    
    bool Cookie::SetCookie(std::string name, std::string value)
    {
        this->SetCookie(name, value, 0);
        return true;
    } 
    
    bool Cookie::SetCookie(std::string name, std::string value, int expire)
    {    
        n_CookieSend[name] = value;        
        return true;
    }    
}
